﻿namespace VideoWorld.controls
{
    using System;
    using System.Data;
    using System.Drawing;
    using System.Web;

    //调用GetRecommendVideos方法显示推荐影片
    public class RecommendVideos : System.Web.UI.UserControl
    {
        protected System.Web.UI.WebControls.DataList dataListRecommend;
        private void Page_Load(object sender, System.EventArgs e)
        {
            //把数据绑定在控件DataList显示在界面上
            dataListRecommend.DataSource = DataAccess.Videos.GetRecommendVideos().Tables[0].DefaultView;
            dataListRecommend.DataBind();
        }

        #region Web Form Designer generated code
        override protected void OnInit(EventArgs e)
        {
            //
            // CODEGEN: This call is required by the ASP.NET Web Form Designer.
            //
            InitializeComponent();
            base.OnInit(e);
        }

        /// <summary>
        ///		Required method for Designer support - do not modify
        ///		the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.Load += new System.EventHandler(this.Page_Load);

        }
        #endregion
    }
}
